package hzau.pojo.question;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import hzau.pojo.requestParams.QuestionsRegisterParam;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Question implements Serializable {
    @TableId(type = IdType.AUTO)
    Long id;
    Long paperId;
    String description;
    Integer type;
    String pic;
    Integer questionId;
    @TableField(exist = false)
    Double score;
    public Question(QuestionsRegisterParam questionsRegisterParam){
        this.paperId=questionsRegisterParam.getPaperId();
        this.description=questionsRegisterParam.getDescription();
        this.type=questionsRegisterParam.getType();
        this.questionId=questionsRegisterParam.getQuestionId();
    }

}
